<%@ page import="mybatis.pojo.Subject" %>
<%@ page import="mybatis.services.SubjectService" %>
<%@ page import="mybatis.pojo.Grade" %>
<%@ page import="mybatis.util.StrUtil" %>
<%@ page import="mybatis.services.GradeService" %><%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/4
  Time: 17:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    int gid = StrUtil.toInt( request.getParameter("gid"));
    out.print(gid);


    String gName = request.getParameter("gname");

    Grade grade = new Grade();
    grade.setId(gid);
    grade.setGname(gName);
    int update = GradeService.ME.update(grade);
    if (update > 0) {
        out.print("修改成功");
    } else {
        out.print("修改失败");
    }
%>

</body>
</html>
